package com.ryskoo.catering.productattrvalue.service;

import com.ryskoo.catering.productattrvalue.domain.ProductAttrValuePO;
import com.ryskoo.catering.productattrvalue.repository.IProductAttrValueRepository;
import com.ryskoo.framework.core.service.BasicServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.PostConstruct;
import java.util.List;

@Service
@Transactional
public class ProductAttrValueServiceImpl extends BasicServiceImpl<ProductAttrValuePO> implements IProductAttrValueService{
    @Autowired
    private IProductAttrValueRepository productAttrValueRepository;

    @PostConstruct
    public void init(){
        this.setDao(productAttrValueRepository);
    }

    @Override
    public void deleteByAttrUuids(List<String> attrUuids) {
        productAttrValueRepository.deleteByAttrIds(attrUuids);
    }
}
